package com.lzy.cloud.ticket.train.servcie.impl;

import com.lzy.cloud.ticket.train.dtos.TrainRefundDto;
import com.lzy.cloud.ticket.train.entity.TrainRefund;
import com.lzy.cloud.ticket.train.mapper.TrainRefundMapperExt;
import com.lzy.cloud.ticket.train.servcie.TrainRefundService;
import com.lzy.framework.core.utils.DozerUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by WIN7 on 2018/6/1.
 */
@Service
public class TrainRefundServiceImpl implements TrainRefundService {

    @Autowired
    TrainRefundMapperExt trainRefundMapperExt;

    @Override
    public boolean createTrainRefund(TrainRefundDto trainRefundDto) {
        return trainRefundMapperExt.insertSelective(DozerUtils.map(trainRefundDto, TrainRefund.class))>0;
    }
}
